package com.imooc.town.exception;


import com.imooc.town.enums.ResultEnum;
import lombok.Data;

/**
 * Created by 10077 on 2018/3/21.
 * desc:
 */
@Data
public class SellException extends RuntimeException {

    private Integer code;

    public SellException(ResultEnum resultEnum){
        super(resultEnum.getMessage());
        this.code = resultEnum.getCode();
    }

    public SellException(Integer code,String message){

        super(message);
        this.code = code;

    }

}
